package hck;
import java.io.Serializable;
import java.util.ArrayList;

public class Article implements Serializable {
	private static final long serialVersionUID = -913434964255615434L;
	private ArrayList<String> recommendersList = new ArrayList<String>();
	private ArrayList<String> unrecommendersList = new ArrayList<String>();
	private ArrayList<String> noncommittersList = new ArrayList<String>();
	private String ID;
	private String author;
	private String postTime;
	
	public Article(String ID, String author, String postTime) {
		this.ID = ID;
		this.author = author;
		this.postTime = postTime;
	}
	
	public String getArticleID() {
		return this.ID;
	}
	
	public String getAuthor() {
		return this.author;
	}
	
	public String getPostTime() {
		return this.postTime;
	}
	
	public void addRecommender(String recommender) {
		this.recommendersList.add(recommender);
	}
	
	public ArrayList<String> getRecommendersList() {
		return this.recommendersList;
	}
	
	public void addUnrecommender(String unrecommender) {
		this.unrecommendersList.add(unrecommender);
	}
	
	public ArrayList<String> getUnrecommendersList() {
		return this.unrecommendersList;
	}
	
	public void addNoncommitter(String noncommitter) {
		this.noncommittersList.add(noncommitter);
	}

	public ArrayList<String> getNoncommitersList() {
		return this.noncommittersList;
	}
	
	/* In case ArticleFileParser reads more than one "From:" tag, then
	 * the attributes added so far must be cleaned */
	public void cleanLists() {
		this.recommendersList.clear();
		this.unrecommendersList.clear();
		this.noncommittersList.clear();
	}
	
}